<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
     <html>
        <head>
        <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
        <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
        <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>用户帖子页面</title>
        </head>
        <body>
<nav class="navbar navbar-default" role="navigation">
	<div class="container-fluid">
	<div class="navbar-header">
		<a class="navbar-brand" href="#">旅游网站</a>
	</div>
	<div>
		<ul class="nav navbar-nav">
			<li><a href="searchAllProducts">旅游产品</a></li>
			<li class="dropdown">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown">
					用户区
					<b class="caret"></b>
				</a>
				<ul class="dropdown-menu">
					<li><a href="toAddC">用户发帖</a></li>
					<li><a href="selectAllComment">用户帖子区</a></li>
				</ul>
			</li>
            <li><a href="initS">天气查询</a></li>
		</ul>
        <ul class="nav navbar-nav navbar-right">
            <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">用户中心
                    <b class="caret"></b>
                </a>
                <ul class="dropdown-menu">
					<li><a href="touUpdate">修改用户信息</a></li>
					<li><a href="selectMyCart">查看用户购物车</a></li>
                    <li><a href="selectMyOrderList">查看用户订单</a></li>
				</ul>
            </li>
            <li><a href="ulogOut"><span class="glyphicon glyphicon-log-out"></span> 登出</a></li>
        </ul>
	</div>
	</div>
</nav>
<br>
<h3>用户发帖</h3>
<form role="form" action="${pageContext.request.contextPath}/addCom" method="post">
    <div class="form-group">
        <div class="col-lg-2">
            <label for="name">帖子标题：</label>
            <input type="text" class="form-control" name="ctitle" placeholder="请输入帖子标题" required="required">
            <label for="name">帖子内容：</label>
            <br>
            <textarea name="ccontent" placeholder="请输入帖子内容" required="required"></textarea>
            <br>
            <button type="submit" class="btn btn-default">提交</button>
            <button type="reset" class="btn btn-default">重置</button>
        </div>
    </div>
</form>
<br>
<br>
<table class="table table-hover">
	<thead>
		<tr>
			<th>发帖人昵称</th>
            <th>帖子标题</th>
            <th>帖子内容</th>
		</tr>
	</thead>
    <c:forEach items="${c}" var="cc">
	<tbody>
        <tr>
            <td>${cc.uname}</td>
            <td>${cc.ctitle}</td>
            <td>${cc.ccontent}</td>
            </tr>
	</tbody>
</c:forEach>
                </table>
            </body>
            </html>